package com.mdd.front.controller.yangyangLeadingEnterprise;

import com.mdd.common.aop.NotLogin;
import com.mdd.common.entity.yangyangLeadingEnterprise.TAppBanner;
import com.mdd.common.entity.yangyangLeadingEnterprise.common.JsonReturn;
import com.mdd.front.service.yangyangLeadingEnterprise.ITAppBannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("api/appBanner")
@Api(tags = "轮播图管理")
public class TAppBannerController {

    @Resource
    ITAppBannerService appBannerService;

    @NotLogin
    @PostMapping(value = "/selectList",produces = "application/json; charset=UTF-8")
    @ApiOperation(value="轮播图查询")
    @ResponseBody
    public String selectList(@RequestBody Integer type) {
        List<TAppBanner> appBannerList = appBannerService.selectList(TAppBanner.TYPE.type_pic,TAppBanner.SHOWTYPE.banner_index);
        return JsonReturn.success().setListData(appBannerList).toJsonStr();
    }


}
